#include <muduo/net/EventLoop.h>
#include <muduo/base/ThreadLocalSingleton.h>
#include "control/FlightChessBoardServer.h"
#include "model/FlightChessBoardSystemConfig.h"

using namespace muduo;
using namespace control_flight_chess_board;
using namespace model_flight_chess_board;

int
main(int argc,char *argv[])
{
	FlightChessBoardSystemConfig &sysconf = \
		ThreadLocalSingleton<FlightChessBoardSystemConfig>::instance();
	InetAddress listenAddr(sysconf.GetServerPort());
	EventLoop loop;
	FlightChessBoardServer server(&loop,listenAddr,1);
	server.Start();//服务器启动
	loop.loop();//进入事件处理流程
	return 0;
}
